#pragma once
#include <string>
#include <list>
#define SAFE_DELETE(x){\
	delete (x);\
	(x)=0;\
}
class File
{
private:
	File(const char * fileName);
	~File();
	friend class ResourceLoader;

	std::string m_FileName;
	char * m_Data;
	int m_Size;
public:
	bool IsReady() const;
	int GetSize() const;
	const char * GetData() const;
};
class ResourceLoader
{
private:
	ResourceLoader(void);
	ResourceLoader(const Loader&);
	~ResourceLoader(void);
	void operator = (const Loader&);

	std::list<File* >m_FileList;
	static ResourceLoader * m_Instance;
public:
	static ResourceLoader * instance();
	static void create();
	static void destroy();

	void CreateFile(File** f, const char * fileName);
	void DestroyFile(File** f);
	void Update();
};

